package com.pengshun.modules.api.user.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pengshun.modules.api.coal.validator.First;
import com.pengshun.modules.api.coal.validator.Second;
import com.pengshun.modules.api.coal.validator.Third;
import com.pengshun.modules.domain.User;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
public class CarOwnerDto {

    /**
     * 车主认证id
     */
    @NotNull(message = "车主认证id不能为空", groups = {Second.class})
    private Long carOwnerId;
    @NotNull(message = "carDrivingId不能为空", groups = {Third.class})
    private Long carDrivingId;
    /**
     * 用户id
     */
    private Long userId;

    /**
     * 车牌号码
     */
    @NotNull(message = "车牌号码不能为空", groups = {First.class})
    @Length(max = 7,message = "车牌号码不能超过7位", groups = {First.class})
    private String carNumber;

    /**
     * 车辆类型名称
     */
    @NotNull(message = "车辆类型名称不能为空", groups = {First.class})
    private String typeName;
    private String isSelf;
    private String carPhoto;

    /**
     * 类型id
     */
    @NotNull(message = "类型id不能为空", groups = {First.class})
    private Long vehicleTypeId;

    /**
     * 车重
     */
    @NotNull(message = "车重不能为空", groups = {First.class})
    @Length(max =8,message = "车重不能超过1000顿", groups = {First.class})
    private String carWight;

    /**
     * 载重
     */
    @NotNull(message = "载重不能为空", groups = {First.class})
    @Length(max = 8,message = "载重不能超过1000顿", groups = {First.class})
    private String carLoad;
    private String operatingFont;
    private String operatingBack;
    private String proveImage;

    /**
     * 车辆长度
     */
    @NotNull(message = "车辆长度不能为空", groups = {First.class})
    private String carLength;

    /**
     * 车辆长度id
     */
    @NotNull(message = "车辆长度id不能为空", groups = {First.class})
    private Long vehicleLengthId;

    /**
     * 行驶证图片
     */
    @NotNull(message = "行驶证图片不能为空", groups = {First.class})
    private String vehicleLicenseFirstPic;
    private String vehicleLicenseSecondPic;

    /**
     * 审批状态(1审核中,2通过审核,3审核失败4已过期)
     */
    private Integer status;

    /**
     * 审批人id
     */
    private Long reviewerUserId;

    /**
     * 审批人
     */
    private String reviewerUserName;

    /**
     * 审批意见
     */
    private String comments;

    /**
     * 申请时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyDate;

    /**
     * 审批时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reviewDate;

    private Integer userType;
    private Integer carStatus;

    private List<User> users;
}
